const tokenStr = 'tokenstr' // 声明一个常量用来保存多处使用的名字，便于修改
// 获取token
export const getToken = () => JSON.parse(localStorage.getItem(tokenStr))

// 设置token
export const setToken = (tokenObj) => localStorage.setItem(tokenStr, JSON.stringify(tokenObj))

// 删除token
export const removeToken = () => localStorage.removeItem(tokenStr)
